import React, { Component } from 'react'
import './index.css'
import PubSub from 'pubsub-js'

export default class index extends Component {
  state = {flag:true}

  handleClickNavigation = ()=>{
    console.log(this.state.flag)
   
    if(this.state.flag){
      this.setState({flag:false})
      console.log(this.state.flag)
    }else{
      this.setState({flag:true})
      console.log(this.state.flag)
    }
    PubSub.publish('laogao',this.state.flag)
    
  }

  render() {
    return (
      <div className="content-wapper-content-header">
        <button className="content-wapper-content-header-button" onClick={this.handleClickNavigation}>折叠菜单图标</button>
      </div>
    )
  }
}
